package com.foreveross.proxyip.monitor.vo;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.Date;

import com.foreveross.proxyip.infra.utils.DateUtils;


/**
 * 源IP记录vo
 * 字符串的字段可以作为数据库查询的条件，monitor包下的vo都是这个属性
 * @author Administrator
 *
 */
public class ExtractLogEntityVO {
//	public final static SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
	private String id;

	private Date beginTime;
	private String beginTimeStr;
	private Date createTime;
	private String createTimeStr;
	private Date endTime;
	private String endTimeStr;
	private Long expendTime;
	private String expendTimeStr;
	private String extractMode;

	private String extractOtherMessage;
	
	private Integer extractNum;
	private String extractNumStr;
	private Integer state;
	private String stateStr;
	
	
	
	public ExtractLogEntityVO(String id, Date beginTime, Date createTime,
			Date endTime, Long expendTime, String extractMode,
			String extractOtherMessage, Integer extractNum, Integer state) {
		super();
		this.id = id;;
		this.beginTime = beginTime;
		this.beginTimeStr=beginTime==null?"":DateUtils.DATE_FMT_CN_BARS_YMD_HMS.format(beginTime);
		this.createTime = createTime;
		this.createTimeStr=this.createTime==null?"":DateUtils.DATE_FMT_CN_BARS_YMD_HMS.format(this.createTime);
		this.endTime = endTime;
		this.endTimeStr=this.endTime==null?"":DateUtils.DATE_FMT_CN_BARS_YMD_HMS.format(this.endTime);
		this.expendTime = expendTime;
		this.expendTimeStr=this.expendTime+"";
		this.extractMode=extractMode;
		this.extractOtherMessage = extractOtherMessage;
		this.extractNum = extractNum;
		this.extractNumStr=extractNum+"";
		this.state = state;
		this.stateStr=state+"";
	}
	public ExtractLogEntityVO() {
		super();
		// TODO Auto-generated constructor stub
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public Date getBeginTime() {
		return beginTime;
	}
	public void setBeginTime(Date beginTime) {
		this.beginTime = beginTime;
	}
	public String getBeginTimeStr() {
		return beginTimeStr;
	}
	public void setBeginTimeStr(String beginTimeStr) {
		this.beginTimeStr = beginTimeStr;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public String getCreateTimeStr() {
		return createTimeStr;
	}
	public void setCreateTimeStr(String createTimeStr) {
		this.createTimeStr = createTimeStr;
	}
	public Date getEndTime() {
		return endTime;
	}
	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	public String getEndTimeStr() {
		return endTimeStr;
	}
	public void setEndTimeStr(String endTimeStr) {
		this.endTimeStr = endTimeStr;
	}
	public Long getExpendTime() {
		return expendTime;
	}
	public void setExpendTime(Long expendTime) {
		this.expendTime = expendTime;
	}
	public String getExpendTimeStr() {
		return expendTimeStr;
	}
	public void setExpendTimeStr(String expendTimeStr) {
		this.expendTimeStr = expendTimeStr;
	}
	public String getExtractMode() {
		return extractMode;
	}
	public void setExtractMode(String extractMode) {
		//this.extractMode = extractMode;
		try {
			this.extractMode=URLDecoder.decode(extractMode, "UTF-8");
		} catch (UnsupportedEncodingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	public String getExtractOtherMessage() {
		return extractOtherMessage;
	}
	public void setExtractOtherMessage(String extractOtherMessage) {
		this.extractOtherMessage = extractOtherMessage;
	}
	public Integer getExtractNum() {
		return extractNum;
	}
	public void setExtractNum(Integer extractNum) {
		this.extractNum = extractNum;
	}
	public String getExtractNumStr() {
		return extractNumStr;
	}
	public void setExtractNumStr(String extractNumStr) {
		this.extractNumStr = extractNumStr;
	}
	public Integer getState() {
		return state;
	}
	public void setState(Integer state) {
		this.state = state;
	}
	public String getStateStr() {
		return stateStr;
	}
	public void setStateStr(String stateStr) {
		this.stateStr = stateStr;
	}
	
	
	
}	
